var getMessageTask=null;
$(function () {

    $("#rootDirectory").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        var thisSpan = $(this);
        if ($(this).children('ul').css('display') == 'none') {
            $(this).children("a").children("i").removeClass("menu-icon-right");
            $(this).children("a").children("i").addClass("menu-icon-down");
            $(this).siblings().children("a").children("i").addClass("menu-icon-right");
            $(this).children("ul").slideDown("fast");
            $(this).siblings().children("ul").slideUp("fast");
        } else {
            $(this).children("a").children("i").removeClass("menu-icon-down");
            $(this).children("a").children("i").addClass("menu-icon-right");
            $(this).children("ul").slideUp("fast");
        }
    });
    $("#baseReport").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        $("#statisticsReport").children("a").removeClass("checkLi");
        $("#detailedReport").children("a").removeClass("checkLi");
        $("#baseReport").children("a").addClass("checkLi");
        // var projectId=$("#projectId").val();
        // $("#datamain").attr("src", "/reportManage/taskReportListUI");
        $("#datamain").attr("src", "/reportManage/baseReportListUI");
    });

    $("#detailedReport").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        $("#baseReport").children("a").removeClass("checkLi");
        $("#statisticsReport").children("a").removeClass("checkLi");
        $("#detailedReport").children("a").addClass("checkLi");
        // var projectId=$("#projectId").val();
        $("#datamain").attr("src", "/reportManage/detailedReportListUI");
    });
    $("#statisticsReport").click(function () {

        if (event.stopPropagation) {
            // 针对 Mozilla 和 Opera
            event.stopPropagation();
        }else if (window.event) {
            // 针对 IE
            window.event.cancelBubble = true;
        }

        $("#baseReport").children("a").removeClass("checkLi");
        $("#detailedReport").children("a").removeClass("checkLi");
        $("#statisticsReport").children("a").addClass("checkLi");
        // var projectId=$("#projectId").val();
        $("#datamain").attr("src", "/reportManage/statisticsReportListUI");
    });
    init();
});
function init() {
    $("#datamain").attr("src", "/reportManage/baseReportListUI");
    $(".content-left-submenu ul li").children("ul").slideDown(10);
}
